<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

return new class extends Migration {
    /**
     * Run the migrations.
     */
    public function up(): void
    {
        Schema::create('award_item', function (Blueprint $table) {
            $table->id();
            $table->integer('award_id')->unsigned()->nullable(false)->comment('奖品id');
            $table->integer('amount')->unsigned()->default(0)->comment('奖项数量');
            $table->string('name', 64)->comment('奖项名称');
            $table->tinyInteger('round')->unsigned()->default(0)->comment('第几轮次');
            $table->tinyInteger('status')->unsigned()->default(0)->comment('状态；0 未开始，1 进行中，2 已结束');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     */
    public function down(): void
    {
        Schema::dropIfExists('award_item');
    }
};
